package com.gusto.test.semantic.mock;

import java.util.ArrayList;
import java.util.List;

import com.gusto.engine.semsim.Neighbor;
import com.gusto.engine.semsim.neighborhood.storedistance.SimilarityPersistenceDAO;

public class SimilarityPersistenceDAOMockImpl implements SimilarityPersistenceDAO {
	
	private String operation;
	
	public String getOperation() {
		return operation;
	}

	public void cleanDistances(String context) {
		operation = "cleanDistances " + context;
	}

	public Double getDistance(String context, String resource1, String resource2) {
		operation = "getDistance " + context + " " + resource1 + " " + resource2;
		return 0.8;
	}

	public List<Neighbor> getNeighborhood(String context, String resource, Double minDistance, Integer maxNeighbors) {
		operation = "getNeighborhood " + context + " " + resource + " " + minDistance + " " + maxNeighbors;
		return new ArrayList<Neighbor>();
	}

	public void updateDistance(String context, String resource1, String resource2, Double similarity) {
		operation = "updateDistance " + context + " " + resource1 + " " + resource2 + " " + similarity;
	}
	
}
